<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button>点我</button>
</body>
<script>
    var btn = document.getElementsByTagName('button')[0]
    btn.onclick = async function(){
        var url = 'https://study.duyiedu.com/api/citylist'
        var headers = new Headers({a:1,b:2})
        var req = new Request(url,{headers})
        console.log(req.headers.get('a'))
        var res = await fetch(req)
        console.log(res)
    }
    

</script>
</html>